#!/usr/bin/env ruby
# A renderer to ouput logger notifications in YAML format (XML hashes).
class RedBook::YamlRenderer
    
	attr_accessor :output
	# Initializ the renderer
	def initialize
		reset
	end
	
	# Reset the output buffer.
	def reset
		@output = []
	end
	
	# Renderer a logger notification element.
	def render(element, options={})
		raise RendererError, "Invalid Element" unless element.xhash?
		@output << element.to_yaml.encode_out
	end
	
end
